/*
 * WllInterpreter.h
 *
 *  Created on: 2015-12-31
 *      Author: wll
 */

#ifndef WLL_INTERPRETER_H
#define WLL_INTERPRETER_H

#include "LanguageSymbols.h"
#include "LanguageTranslations.h"
#include <vector>
#include <string>
#include <map>
#include <WllUtil.h>
#include <WllTraceConfig.h>
#include "Compiler.h"
#include "InterpretContext.h"

class Compiler;

class WllInterpreter
{
public:
	WllInterpreter(Compiler* compiler);
    virtual int GetVersion() = 0;
	virtual bool InterpretWllVersion(const std::vector<Symbols>& input_symbols, std::vector<Symbols>& output_symbols)=0;
	Compiler* compiler;
	InterpretContext context;

    static bool Interpret(const std::vector<Symbols> &input_symbols, std::vector<Symbols> &output_symbols, Compiler *compiler = nullptr);
    static WllInterpreter *CreateWllInterpreter(const Symbols& wll_version, Compiler* compiler);
    static WllInterpreter *GetOrCreateWllInterpreter(const Symbols& wll_version, Compiler* compiler);
};

#endif /* WLL_INTERPRETER_H */
